<style>
#surveyAnalysis {
	display: table;
	position: relative;
	width: 100%;
	margin: 0px 0px 5px 0px;
	background-color: #E1EEF4;
}

.analysisDescription {
	color: #00557F;
	text-align: center;
	width: 60%;
	padding: 4px 10px;
	display: table-cell;
	vertical-align: middle;
}

.analysisName {
	background-color: #2191C0;
	color: #FFFFFF;
	font-weight: bold;
	padding: 4px 10px;
	width: 300px;
	text-align: right;
	float: left;
}

.treatmentTypeName {
	background-color: #2191C0;
	color: #FFFFFF;
	font-weight: bold;
	font-size: 13px;
	padding: 4px 10px;
	text-align: center;
}

#treatments-info ul {
	padding-left: 0px;
	list-style-type: none;
	margin-top: 2px;
}

.medicationName {
	width: 280px;
	background: #379CC6;
	color: #FFFFFF;
	font-weight: bold;
	padding: 2px 10px;
	text-align: right;
	margin-top: 5px;
	border-top-right-radius: 3px;
	border-bottom-right-radius: 3px;
	font-size: 13px;
}

.medicationDetailName {
	width: 260px;
	background: #4da7cc;
	color: #FFFFFF;
	font-weight: bold;
	padding: 2px 10px;
	text-align: right;
	margin-right: 110px;
}

.treatment-checkbox {
	margin: 2px 0px 0px 0px;
}

.insertion-select {
	margin: 0px 0px 0px 10px;
	font-family: 'Helvetica','Arial','Sans' !important;
    font-size: 12px !important;
}

#selectInsertionBlock {
	display: inline;
}

.treatments {
	padding: 5px 0px;
	border-bottom: 1px solid #2191C0;
}

#treatments-info label {
	font-weight: bold;
	float: none;
	width: none;
	color: #666;
	cursor: pointer;
	display: inline;
}

.treatment-multiplicity, .treatment-dose, .treatment-description, .insertionInput, .therapy-type {
	width: 100px;
	margin: 5px 15px 0 5px;
	padding: 1px;
	height: 16px;
	overflow: hidden;
}

.treatment-multiplicity{
	width: 30px;	
}

.therapy-type {
	width: 160px;
}

</style>

<script>
$(document).ready(function() {
	$('textarea').addClass("autogrow-short").autogrow();
});
</script>

<div id="treatments-info">
	#{if surveyTreatments != null}
		#{list items:surveyTreatments, as:'surveyTreatment'}
			<div class="treatmentTypeName">${surveyTreatment.medicationDetail.medication.treatmentType.treatmentTypeName}</div>
			<ul>
				<li>
					<div class="medicationName">${surveyTreatment.medicationDetail.medication.medicationName}</div>
					<ul>
						<li>
							<div class="treatments">
								<div class="medicationDetailName">${surveyTreatment.medicationDetail.medicationDetailName}</div>
								<div>
								#{if surveyTreatment.insertion != null}
									<label>&{'treatment.insertion'}</label>
									<textarea class="insertionInput" disabled="disabled">${surveyTreatment.insertion.insertionName}</textarea>
								#{/if}
								#{if surveyTreatment.allergen != null}
									<label>&{'treatment.allergen'}</label>
									<textarea class="insertionInput" disabled="disabled">${surveyTreatment.allergen.allergenName}</textarea>
								#{/if}
								#{if surveyTreatment.therapyType != null}
									<label>&{'therapy.type'}</label>
									<textarea class="therapy-type" disabled="disabled">${surveyTreatment.therapyType.name() == 'BASIC' ? messages.get('therapy.type.basic') : surveyTreatment.therapyType.name() == 'SUPPORTING' ? messages.get('therapy.type.supporting') : messages.get('select.therapy.type')}</textarea>
								#{/if}
								#{if surveyTreatment.treatmentDescription != null && !surveyTreatment.treatmentDescription.isEmpty()}
									<label>&{'treatment.description'}</label>
									<textarea class="treatment-description" disabled="disabled">${surveyTreatment.treatmentDescription}</textarea>
								#{/if}
								#{if surveyTreatment.multiplicity != null && !surveyTreatment.multiplicity.isEmpty()}
									<label>&{'treatment.multiplicity'}</label>
									<textarea class="treatment-multiplicity" disabled="disabled">${surveyTreatment.multiplicity}</textarea>
								#{/if}
								#{if surveyTreatment.dose != null && !surveyTreatment.dose.isEmpty()}
									<label>&{'treatment.dose'}</label>
									<textarea class="treatment-dose" disabled="disabled">${surveyTreatment.dose}</textarea>
								#{/if}
								</div>
							</div>
						</li>
					</ul>
				</li>
			</ul>
		#{/list} 
	#{/if} 
</div>